#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include "SPWM.h"


int main(void)
{
    int32_t iSamplingNumber = 64, i = 0;
    float fModulationDepth = 1.0f;


    printf("fSpwmSymmetryRules:");
    for(i = 0; i < iSamplingNumber; ++i)
    {
        if((i % 8) == 0)
            printf("\r\n");

        printf("%.06f\t", fSpwmSymmetryRules(i, iSamplingNumber, fModulationDepth));
    }
    printf("\r\n\n");

    printf("fSpwmAsymmetryRules:");
    for(i = 0; i < iSamplingNumber; ++i)
    {
        if((i % 8) == 0)
            printf("\r\n");

        printf("%.06f\t", fSpwmAsymmetryRules(i, iSamplingNumber, fModulationDepth));
    }
    printf("\r\n\n");

    printf("fSpwmEquiareal:");
    for(i = 0; i < iSamplingNumber; ++i)
    {
        if((i % 8) == 0)
            printf("\r\n");

        printf("%.06f\t", fSpwmEquiareal(i, iSamplingNumber, fModulationDepth));
    }
    printf("\r\n\n");


    printf("fSvpwmSymmetryRules:");
    for(i = 0; i < iSamplingNumber; ++i)
    {
        if((i % 8) == 0)
            printf("\r\n");

        printf("%.06f\t", fSvpwmSymmetryRules(i, iSamplingNumber, fModulationDepth));
    }
    printf("\r\n\n");

    printf("fSvpwmAsymmetryRules:");
    for(i = 0; i < iSamplingNumber; ++i)
    {
        if((i % 8) == 0)
            printf("\r\n");

        printf("%.06f\t", fSvpwmAsymmetryRules(i, iSamplingNumber, fModulationDepth));
    }
    printf("\r\n\n");

    printf("fSvpwmEquiareal:");
    for(i = 0; i < iSamplingNumber; ++i)
    {
        if((i % 8) == 0)
            printf("\r\n");

        printf("%.06f\t", fSvpwmEquiareal(i, iSamplingNumber, fModulationDepth));
    }
    printf("\r\n\n");


    return 0;
}

